//package com.software.graduationproject.modules.sys.service;
//
//import cn.hutool.core.bean.BeanUtil;
//import com.software.graduationproject.commons.log.LogDto;
//import com.software.graduationproject.commons.log.LogEvent;
//import com.software.graduationproject.modules.sys.entity.SysLog;
//import com.software.graduationproject.modules.sys.mapper.SysLogMapper;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.event.EventListener;
//import org.springframework.scheduling.annotation.Async;
//import org.springframework.security.core.Authentication;
//import org.springframework.security.core.context.SecurityContextHolder;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
///**
// * SysLogService : 系统日志
// * ---------------------------------------------------------------------------------------------------------------------
// */
//@Service
//@Slf4j
//public class SysLogService {
//
//    @Autowired
//    private SysLogMapper sysLogMapper;
//
//    /**
//     * 异步记录系统日志
//     */
//    @Async
//    @EventListener
//    public void logEventListener(LogEvent event) {
//        LogDto logDto = event.getLogDto();
//        SysLog sysLog = new SysLog();
//        BeanUtil.copyProperties(logDto, sysLog);
//        sysLogMapper.insert(sysLog);
//    }
//
//    public List<SysLog> selectListVo() {
//        return sysLogMapper.selectList(null);
//    }
//
//}